home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-ARM / HARDIRQ.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  681b  |  29 lines

  1. #ifndef __ASM_HARDIRQ_H
  2. #define __ASM_HARDIRQ_H
  3.  
  4. #include <linux/tasks.h>
  5.  
  6. extern unsigned int local_irq_count[NR_CPUS];
  7.  
  8. /*
  9.  * Are we in an interrupt context? Either doing bottom half
  10.  * or hardware interrupt processing?
  11.  */
  12. #define in_interrupt() (local_irq_count[smp_processor_id()] + local_bh_count[smp_processor_id()] != 0)
  13.  
  14. #ifndef __SMP__
  15.  
  16. #define hardirq_trylock(cpu)    (local_irq_count[cpu] == 0)
  17. #define hardirq_endlock(cpu)    do { } while (0)
  18.  
  19. #define hardirq_enter(cpu)    (local_irq_count[cpu]++)
  20. #define hardirq_exit(cpu)    (local_irq_count[cpu]--)
  21.  
  22. #define synchronize_irq()    do { } while (0)
  23.  
  24. #else
  25. #error SMP not supported
  26. #endif /* __SMP__ */
  27.  
  28. #endif /* __ASM_HARDIRQ_H */
  29.